package cn.gson.springboot.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the return_drugs_yk database table.
 * 
 */
@Entity
@Table(name="return_drugs_yk")
@NamedQuery(name="ReturnDrugsYk.findAll", query="SELECT r FROM ReturnDrugsYk r")
public class ReturnDrugsYk implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="return_drugs_id")
	private int returnDrugsId;

	@Column(name="return_drugs_number")
	private int returnDrugsNumber;

	@Column(name="return_drugs_people")
	private String returnDrugsPeople;
	
	@Column(name="return_yuanyin")
	private String returnYuanyin;
	
	@Column(name="return_static")
	private String returnStatic;

	@Column(name="return_drugs_price")
	private BigDecimal returnDrugsPrice;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="return_drugs_time")
	private Date returnDrugsTime;

	//bi-directional many-to-one association to ReturnDetailsYk
	@OneToMany(mappedBy="returnDrugsYk")
	private List<ReturnDetailsYk> returnDetailsYks;

	//bi-directional many-to-one association to FactoryYk
	@ManyToOne
	@JoinColumn(name="factory_id")
	private FactoryYk factoryYk;

	public ReturnDrugsYk() {
	}

	public int getReturnDrugsId() {
		return this.returnDrugsId;
	}

	public void setReturnDrugsId(int returnDrugsId) {
		this.returnDrugsId = returnDrugsId;
	}

	public int getReturnDrugsNumber() {
		return this.returnDrugsNumber;
	}

	public void setReturnDrugsNumber(int returnDrugsNumber) {
		this.returnDrugsNumber = returnDrugsNumber;
	}

	public String getReturnDrugsPeople() {
		return this.returnDrugsPeople;
	}

	public void setReturnDrugsPeople(String returnDrugsPeople) {
		this.returnDrugsPeople = returnDrugsPeople;
	}

	public String getReturnYuanyin() {
		return returnYuanyin;
	}

	public void setReturnYuanyin(String returnYuanyin) {
		this.returnYuanyin = returnYuanyin;
	}

	public String getReturnStatic() {
		return returnStatic;
	}

	public void setReturnStatic(String returnStatic) {
		this.returnStatic = returnStatic;
	}

	public BigDecimal getReturnDrugsPrice() {
		return this.returnDrugsPrice;
	}

	public void setReturnDrugsPrice(BigDecimal returnDrugsPrice) {
		this.returnDrugsPrice = returnDrugsPrice;
	}

	public Date getReturnDrugsTime() {
		return this.returnDrugsTime;
	}

	public void setReturnDrugsTime(Date returnDrugsTime) {
		this.returnDrugsTime = returnDrugsTime;
	}

	public List<ReturnDetailsYk> getReturnDetailsYks() {
		return this.returnDetailsYks;
	}

	public void setReturnDetailsYks(List<ReturnDetailsYk> returnDetailsYks) {
		this.returnDetailsYks = returnDetailsYks;
	}

	public ReturnDetailsYk addReturnDetailsYk(ReturnDetailsYk returnDetailsYk) {
		getReturnDetailsYks().add(returnDetailsYk);
		returnDetailsYk.setReturnDrugsYk(this);

		return returnDetailsYk;
	}

	public ReturnDetailsYk removeReturnDetailsYk(ReturnDetailsYk returnDetailsYk) {
		getReturnDetailsYks().remove(returnDetailsYk);
		returnDetailsYk.setReturnDrugsYk(null);

		return returnDetailsYk;
	}

	public FactoryYk getFactoryYk() {
		return this.factoryYk;
	}

	public void setFactoryYk(FactoryYk factoryYk) {
		this.factoryYk = factoryYk;
	}

}